home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / network / entrez / client / objneten.h < prev   
Text File  |  1996-07-05  |  18KB  |  493 lines

  1. /*  objneten.h
  2. * ===========================================================================
  3. *
  4. *                            PUBLIC DOMAIN NOTICE                          
  5. *               National Center for Biotechnology Information
  6. *                                                                          
  7. *  This software/database is a "United States Government Work" under the   
  8. *  terms of the United States Copyright Act.  It was written as part of    
  9. *  the author's official duties as a United States Government employee and 
  10. *  thus cannot be copyrighted.  This software/database is freely available 
  11. *  to the public for use. The National Library of Medicine and the U.S.    
  12. *  Government have not placed any restriction on its use or reproduction.  
  13. *                                                                          
  14. *  Although all reasonable efforts have been taken to ensure the accuracy  
  15. *  and reliability of the software and data, the NLM and the U.S.          
  16. *  Government do not and cannot warrant the performance or results that    
  17. *  may be obtained by using this software or data. The NLM and the U.S.    
  18. *  Government disclaim all warranties, express or implied, including       
  19. *  warranties of performance, merchantability or fitness for any particular
  20. *  purpose.                                                                
  21. *                                                                          
  22. *  Please cite the author in any work or product based on this material.   
  23. *
  24. * ===========================================================================
  25. *
  26. * File Name:  objneten.h
  27. *
  28. * Author:  Epstein
  29. *   
  30. * Version Creation Date: 6/3/92
  31. *
  32. * $Revision: 4.0 $
  33. *
  34. * File Description:  Object loader interface for module NCBI-Entrez
  35. *
  36. * Modifications:  
  37. * --------------------------------------------------------------------------
  38. * Date       Name        Description of modification
  39. * -------  ----------  -----------------------------------------------------
  40. * 8-16-94  Brylawski   Added declarations for EntrezNeighborText and
  41. *                      EntrezHierarchy loaders and structures.
  42. *
  43. * 11-20-94 Brylawski   Moved the EntrezNeighborText structure to accentr.h
  44. *                      to permit its use in chosen.c and netentr.c .
  45. * ==========================================================================
  46. *
  47. *
  48. * RCS Modification History:
  49. * $Log: objneten.h,v $
  50.  * Revision 4.0  1995/07/26  13:54:59  ostell
  51.  * force revision to 4.0
  52.  *
  53.  * Revision 1.14  1995/07/11  12:30:30  epstein
  54.  * change CDECLs to LIBCALLs
  55.  *
  56.  * Revision 1.13  1995/07/10  19:39:04  epstein
  57.  * add docsumX
  58.  *
  59.  * Revision 1.12  1995/06/23  13:21:16  kans
  60.  * include <accentr.h> to pull in Biostruc_supported symbol
  61.  *
  62.  * Revision 1.11  1995/05/17  17:53:35  epstein
  63.  * add RCS log revision history
  64.  *
  65. */
  66.  
  67. #ifndef _NCBI_NetEntrez_
  68. #define _NCBI_NetEntrez_
  69.  
  70. #ifndef _ASNTOOL_
  71. #include <asn.h>
  72. #endif
  73.  
  74. /* accentr.h is included to define Biostruc_supported */
  75. #ifndef _ACCENTR_
  76. #include <accentr.h>
  77. #endif
  78.  
  79. /*****************************************************************************
  80. *
  81. *   loader
  82. *
  83. *****************************************************************************/
  84. extern Boolean NetEntAsnLoad PROTO((void));
  85.  
  86. /*****************************************************************************
  87. *
  88. *   internal structures for NCBI-Entrez objects
  89. *
  90. *****************************************************************************/
  91.  
  92. /*****************************************************************************
  93. *
  94. *   Entrez-ids
  95. *
  96. *****************************************************************************/
  97.  
  98.  
  99. typedef struct {
  100.     Int4 numid;
  101.     DocUidPtr ids;
  102. } EntrezIds, PNTR EntrezIdsPtr;
  103.  
  104. extern EntrezIdsPtr LIBCALL EntrezIdsNew PROTO((void));
  105. extern EntrezIdsPtr LIBCALL EntrezIdsFree PROTO(( EntrezIdsPtr ufp));
  106. extern EntrezIdsPtr LIBCALL EntrezIdsAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
  107. extern Boolean LIBCALL EntrezIdsAsnWrite PROTO((EntrezIdsPtr ufp, AsnIoPtr aip, AsnTypePtr atp));
  108.  
  109.  
  110. /*****************************************************************************
  111. *
  112. *   Marked-link-set
  113. *
  114. *****************************************************************************/
  115. typedef struct {
  116.     LinkSetPtr link_set;
  117.     Int4 uids_processed;
  118.     EntrezIdsPtr  marked_missing;
  119. } MarkedLinkSet, PNTR MarkedLinkSetPtr;
  120.  
  121.  
  122. extern MarkedLinkSetPtr LIBCALL MarkedLinkSetNew PROTO((void));
  123. extern MarkedLinkSetPtr LIBCALL MarkedLinkSetFree PROTO(( MarkedLinkSetPtr ufp));
  124. extern MarkedLinkSetPtr LIBCALL MarkedLinkSetAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
  125. extern Boolean LIBCALL MarkedLinkSetAsnWrite PROTO((MarkedLinkSetPtr ufp, AsnIoPtr aip, AsnTypePtr atp));
  126.  
  127.  
  128. /*****************************************************************************
  129. *
  130. *   Named-List
  131. *
  132. *****************************************************************************/
  133.  
  134. typedef struct {
  135.     DocType type;
  136.     DocField fld;
  137.     CharPtr term;
  138.     EntrezIdsPtr uids;
  139. } NamedList, PNTR NamedListPtr;
  140.  
  141. extern NamedListPtr LIBCALL NamedListNew PROTO((void));
  142. extern NamedListPtr LIBCALL NamedListFree PROTO(( NamedListPtr ufp));
  143. extern NamedListPtr LIBCALL NamedListAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
  144. extern Boolean LIBCALL NamedListAsnWrite PROTO((NamedListPtr ufp, AsnIoPtr aip, AsnTypePtr atp));
  145.  
  146.  
  147. /*****************************************************************************
  148. *
  149. *   Term-by-Page
  150. *
  151. *****************************************************************************/
  152.  
  153. typedef struct {
  154.     DocType type;
  155.     DocField fld;
  156.     Int4 page;
  157.     Int4 num_pages;
  158. } TermByPage, PNTR TermByPagePtr;
  159.  
  160. extern TermByPagePtr LIBCALL TermByPageNew PROTO((void));
  161. extern TermByPagePtr LIBCALL TermByPageFree PROTO(( TermByPagePtr ufp));
  162. extern TermByPagePtr LIBCALL TermByPageAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
  163. extern Boolean LIBCALL TermByPageAsnWrite PROTO((TermByPagePtr ufp, AsnIoPtr aip, AsnTypePtr atp));
  164.  
  165.  
  166. /*****************************************************************************
  167. *
  168. *   Term-by-Term
  169. *
  170. *****************************************************************************/
  171.  
  172. typedef struct {
  173.     DocType type;
  174.     DocField fld;
  175.     CharPtr term;
  176.     Int4 num_terms;
  177. } TermByTerm, PNTR TermByTermPtr;
  178.  
  179. extern TermByTermPtr LIBCALL TermByTermNew PROTO((void));
  180. extern TermByTermPtr LIBCALL TermByTermFree PROTO(( TermByTermPtr ufp));
  181. extern TermByTermPtr LIBCALL TermByTermAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
  182. extern Boolean LIBCALL TermByTermAsnWrite PROTO((TermByTermPtr ufp, AsnIoPtr aip, AsnTypePtr atp));
  183.  
  184. /*****************************************************************************
  185. *
  186. *   Term-Lookup
  187. *
  188. *****************************************************************************/
  189.  
  190. typedef struct {
  191.     DocType type;
  192.     DocField fld;
  193.     CharPtr term;
  194. } TermLookup, PNTR TermLookupPtr;
  195.  
  196. extern TermLookupPtr LIBCALL TermLookupNew PROTO((void));
  197. extern TermLookupPtr LIBCALL TermLookupFree PROTO(( TermLookupPtr ufp));
  198. extern TermLookupPtr LIBCALL TermLookupAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
  199. extern Boolean LIBCALL TermLookupAsnWrite PROTO((TermLookupPtr ufp, AsnIoPtr aip, AsnTypePtr atp));
  200.  
  201.  
  202. /*****************************************************************************
  203. *
  204. *   Term-Page-Info
  205. *
  206. *****************************************************************************/
  207.  
  208. typedef struct {
  209.     CharPtr term;
  210.     Int4 spec_count;
  211.     Int4 tot_count;
  212. } TermPageInfo, PNTR TermPageInfoPtr;
  213.  
  214. extern TermPageInfoPtr LIBCALL TermPageInfoNew PROTO((void));
  215. extern TermPageInfoPtr LIBCALL TermPageInfoFree PROTO(( TermPageInfoPtr ufp));
  216. extern TermPageInfoPtr LIBCALL TermPageInfoAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
  217. extern Boolean LIBCALL TermPageInfoAsnWrite PROTO((TermPageInfoPtr ufp, AsnIoPtr aip, AsnTypePtr atp));
  218.  
  219.  
  220. /*****************************************************************************
  221. *
  222. *   Term-Counts
  223. *
  224. *****************************************************************************/
  225.  
  226. typedef struct {
  227.     Boolean found;
  228.     Int4 spec_count;
  229.     Int4 tot_count;
  230. } TermCounts, PNTR TermCountsPtr;
  231.  
  232. extern TermCountsPtr LIBCALL TermCountsNew PROTO((void));
  233. extern TermCountsPtr LIBCALL TermCountsFree PROTO(( TermCountsPtr ufp));
  234. extern TermCountsPtr LIBCALL TermCountsAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
  235. extern Boolean LIBCALL TermCountsAsnWrite PROTO((TermCountsPtr ufp, AsnIoPtr aip, AsnTypePtr atp));
  236.  
  237. /*****************************************************************************
  238. *
  239. *   Link-SetGet
  240. *
  241. *****************************************************************************/
  242.  
  243. typedef struct {
  244.     Int4 max;      /* maximum Ids to return */
  245.     DocType link_to_cls;
  246.     DocType query_cls;
  247.     Boolean mark_missing;
  248.     Int4 query_size;
  249.     DocUidPtr query;
  250. } LinkSetGet, PNTR LinkSetGetPtr;
  251.  
  252. extern LinkSetGetPtr LIBCALL LinkSetGetNew PROTO((void));
  253. extern LinkSetGetPtr LIBCALL LinkSetGetFree PROTO(( LinkSetGetPtr ufp));
  254. extern LinkSetGetPtr LIBCALL LinkSetGetAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
  255. extern Boolean LIBCALL LinkSetGetAsnWrite PROTO((LinkSetGetPtr ufp, AsnIoPtr aip, AsnTypePtr atp));
  256.  
  257. extern DocSumPtr LIBCALL MlSumNew PROTO((void));
  258. extern DocSumPtr LIBCALL MlSumFree PROTO(( DocSumPtr ufp));
  259. extern DocSumPtr LIBCALL MlSumAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
  260. extern Boolean LIBCALL MlSumAsnWrite PROTO((DocSumPtr ufp, AsnIoPtr aip, AsnTypePtr atp));
  261.  
  262. extern DocSumPtr LIBCALL SeqSumNew PROTO((void));
  263. extern DocSumPtr LIBCALL SeqSumFree PROTO(( DocSumPtr ufp));
  264. extern DocSumPtr LIBCALL SeqSumAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
  265. extern Boolean LIBCALL SeqSumAsnWrite PROTO((DocSumPtr ufp, AsnIoPtr aip, AsnTypePtr atp));
  266.  
  267.  
  268.  
  269. /*****************************************************************************
  270. *
  271. *   EntrezDocGet
  272. *
  273. *****************************************************************************/
  274.  
  275.  
  276. typedef struct {
  277.     DocType cls;
  278.     Boolean mark_missing;
  279.     EntrezIdsPtr ids;
  280.     Int4 defer_count;
  281. } EntrezDocGet, PNTR EntrezDocGetPtr;
  282.  
  283. extern EntrezDocGetPtr LIBCALL EntrezDocGetNew PROTO((void));
  284. extern EntrezDocGetPtr LIBCALL EntrezDocGetFree PROTO(( EntrezDocGetPtr ufp));
  285. extern EntrezDocGetPtr LIBCALL EntrezDocGetAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
  286. extern Boolean LIBCALL EntrezDocGetAsnWrite PROTO((EntrezDocGetPtr ufp, AsnIoPtr aip, AsnTypePtr atp));
  287.  
  288.  
  289. /*****************************************************************************
  290. *
  291. *   Medline-list
  292. *
  293. *****************************************************************************/
  294. typedef struct {
  295.     Int4 num;
  296.     MedlineEntryPtr PNTR data; /* vector */
  297.     EntrezIdsPtr marked_missing; /* marked UIDs, optional */
  298. } MedlineEntryList, PNTR MedlineEntryListPtr;
  299.  
  300.  
  301. extern MedlineEntryListPtr LIBCALL MedlineEntryListNew PROTO((void));
  302. extern MedlineEntryListPtr LIBCALL MedlineEntryListFree PROTO(( MedlineEntryListPtr ufp));
  303. extern MedlineEntryListPtr LIBCALL MedlineEntryListAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
  304. extern Boolean LIBCALL MedlineEntryListAsnWrite PROTO((MedlineEntryListPtr ufp, AsnIoPtr aip, AsnTypePtr atp));
  305.  
  306. /*****************************************************************************
  307. *
  308. *   Ml-summary-list
  309. *
  310. *****************************************************************************/
  311. typedef struct {
  312.     Int4 num;
  313.     DocSumPtr PNTR data; /* vector */
  314. } MlSummaryList, PNTR MlSummaryListPtr;
  315.  
  316.  
  317. extern MlSummaryListPtr LIBCALL MlSummaryListNew PROTO((void));
  318. extern MlSummaryListPtr LIBCALL MlSummaryListFree PROTO(( MlSummaryListPtr ufp));
  319. extern MlSummaryListPtr LIBCALL MlSummaryListAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
  320. extern Boolean LIBCALL MlSummaryListAsnWrite PROTO((MlSummaryListPtr ufp, AsnIoPtr aip, AsnTypePtr atp));
  321.  
  322. /*****************************************************************************
  323. *
  324. *   SeqEntryGet
  325. *
  326. *****************************************************************************/
  327.  
  328. typedef struct {
  329.     EntrezIdsPtr ids;
  330.     Int4 retype;
  331.     Boolean mark_missing;
  332. } EntrezSeqGet, PNTR EntrezSeqGetPtr;
  333.  
  334. extern EntrezSeqGetPtr LIBCALL EntrezSeqGetNew PROTO((void));
  335. extern EntrezSeqGetPtr LIBCALL EntrezSeqGetFree PROTO(( EntrezSeqGetPtr ufp));
  336. extern EntrezSeqGetPtr LIBCALL EntrezSeqGetAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
  337. extern Boolean LIBCALL EntrezSeqGetAsnWrite PROTO((EntrezSeqGetPtr ufp, AsnIoPtr aip, AsnTypePtr atp));
  338.  
  339. /*****************************************************************************
  340. *
  341. *   Seq-summary-list
  342. *
  343. *****************************************************************************/
  344. typedef struct {
  345.     Int4 num;
  346.     DocSumPtr PNTR data; /* vector */
  347. } SeqSummaryList, PNTR SeqSummaryListPtr;
  348.  
  349.  
  350. extern SeqSummaryListPtr LIBCALL SeqSummaryListNew PROTO((void));
  351. extern SeqSummaryListPtr LIBCALL SeqSummaryListFree PROTO(( SeqSummaryListPtr ufp));
  352. extern SeqSummaryListPtr LIBCALL SeqSummaryListAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
  353. extern Boolean LIBCALL SeqSummaryListAsnWrite PROTO((SeqSummaryListPtr ufp, AsnIoPtr aip, AsnTypePtr atp));
  354.  
  355.  
  356. /*****************************************************************************
  357. *
  358. *   Seq-entry-list
  359. *
  360. *****************************************************************************/
  361. typedef struct {
  362.     Int4 num;
  363.     SeqEntryPtr PNTR data; /* vector */
  364.     EntrezIdsPtr marked_missing; /* marked UIDs, optional */
  365. } PNTR SeqEntryListPtr;
  366. /* note that SeqEntryList is not provided because the name conflicted with */
  367. /* the name of a function on sequtil.c; the typedef was not needed anyhow  */
  368.  
  369.  
  370. extern SeqEntryListPtr LIBCALL SeqEntryListNew PROTO((void));
  371. extern SeqEntryListPtr LIBCALL SeqEntryListFree PROTO(( SeqEntryListPtr ufp));
  372. extern SeqEntryListPtr LIBCALL SeqEntryListAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
  373. extern Boolean LIBCALL SeqEntryListAsnWrite PROTO((SeqEntryListPtr ufp, AsnIoPtr aip, AsnTypePtr atp));
  374.  
  375.  
  376.  
  377. #ifdef Biostruc_supported
  378.  
  379. /*****************************************************************************
  380. *
  381. *   Biostruc-list
  382. *
  383. *****************************************************************************/
  384. typedef struct {
  385.     Int4 num;
  386.     BiostrucPtr PNTR data; /* vector */
  387.     EntrezIdsPtr marked_missing; /* marked UIDs, optional */
  388. } BiostrucList, PNTR BiostrucListPtr;
  389.  
  390.  
  391. extern BiostrucListPtr LIBCALL BiostrucListNew PROTO((void));
  392. extern BiostrucListPtr LIBCALL BiostrucListFree PROTO(( BiostrucListPtr ufp));
  393. extern BiostrucListPtr LIBCALL BiostrucListAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
  394. extern Boolean LIBCALL BiostrucListAsnWrite PROTO((BiostrucListPtr ufp, AsnIoPtr aip, AsnTypePtr atp));
  395.  
  396. #endif /* Biostruc_supported */
  397.  
  398. /**************************************************
  399. *
  400. *    EntrezNeighborText
  401. *
  402. **************************************************/
  403.  
  404.  
  405. EntrezNeighborTextPtr LIBCALL EntrezNeighborTextAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
  406. Boolean LIBCALL EntrezNeighborTextAsnWrite PROTO (( EntrezNeighborTextPtr , AsnIoPtr, AsnTypePtr));
  407.  
  408.  
  409. /**************************************************
  410. *
  411. *    ChildLink
  412. *
  413. *************************************************/
  414. typedef struct struct_Child_Link {
  415.    struct struct_Child_Link PNTR next;
  416.    CharPtr   name;
  417.    Boolean   isLeafNode;
  418.    Int4   special;
  419.    Int4   total;
  420. } ChildLink, PNTR ChildLinkPtr;
  421.  
  422.  
  423.  
  424. EntrezHierarchyChildPtr LIBCALL EntrezHierarchyChildFree PROTO ((EntrezHierarchyChildPtr ));
  425. EntrezHierarchyChildPtr LIBCALL EntrezHierarchyChildNew PROTO (( void ));
  426. EntrezHierarchyChildPtr LIBCALL EntrezHierarchyChildAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
  427. Boolean LIBCALL EntrezHierarchyChildAsnWrite PROTO (( EntrezHierarchyChildPtr ,AsnIoPtr, AsnTypePtr));
  428.  
  429. EntrezHierarchyPtr LIBCALL EntrezHierarchyFree PROTO ((EntrezHierarchyPtr ));
  430. EntrezHierarchyPtr LIBCALL EntrezHierarchyNew PROTO (( void ));
  431. EntrezHierarchyPtr LIBCALL EntrezHierarchyAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
  432. Boolean LIBCALL EntrezHierarchyAsnWrite PROTO (( EntrezHierarchyPtr , 
  433.                                                   AsnIoPtr, AsnTypePtr));
  434.  
  435.  
  436. /**************************************************
  437. *
  438. *    EntrezBlastreq
  439. *
  440. **************************************************/
  441. typedef struct struct_Entrez_blastreq {
  442.    Uint4 OBbits__;
  443.    BioseqPtr   bsp;
  444.    DocType bsp_database;
  445.    CharPtr   program;
  446.    CharPtr   database;
  447.    CharPtr   options;
  448.    Uint1     showprogress;
  449. } EntrezBlastreq, PNTR EntrezBlastreqPtr;
  450.  
  451.  
  452. EntrezBlastreqPtr LIBCALL EntrezBlastreqFree PROTO ((EntrezBlastreqPtr ));
  453. EntrezBlastreqPtr LIBCALL EntrezBlastreqNew PROTO (( void ));
  454. EntrezBlastreqPtr LIBCALL EntrezBlastreqAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
  455. Boolean LIBCALL EntrezBlastreqAsnWrite PROTO (( EntrezBlastreqPtr , AsnIoPtr, AsnTypePtr));
  456.  
  457.  
  458.  
  459. /**************************************************
  460. *
  461. *    EntrezExtraInfo
  462. *
  463. **************************************************/
  464. typedef struct struct_Entrez_extra_info {
  465.    Uint4 OBbits__;
  466.    Int4   maxlinks;
  467.    Uint1   canneighbortext;
  468.    Uint1   expanded_medline;
  469.    Uint1   canblast;
  470. } EntrezExtraInfo, PNTR EntrezExtraInfoPtr;
  471.  
  472.  
  473. EntrezExtraInfoPtr LIBCALL EntrezExtraInfoFree PROTO ((EntrezExtraInfoPtr ));
  474. EntrezExtraInfoPtr LIBCALL EntrezExtraInfoNew PROTO (( void ));
  475. EntrezExtraInfoPtr LIBCALL EntrezExtraInfoAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
  476. Boolean LIBCALL EntrezExtraInfoAsnWrite PROTO (( EntrezExtraInfoPtr , AsnIoPtr, AsnTypePtr));
  477.  
  478. typedef struct struct_New_summary_List {
  479.    Int4   num;
  480.    DocType type;
  481.    DocSumPtr PNTR data;
  482. } NewSummaryList, PNTR NewSummaryListPtr;
  483.  
  484. NewSummaryListPtr LIBCALL NewSummaryListFree PROTO ((NewSummaryListPtr ));
  485. NewSummaryListPtr LIBCALL NewSummaryListNew PROTO (( void ));
  486. NewSummaryListPtr LIBCALL NewSummaryListAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
  487. Boolean LIBCALL NewSummaryListAsnWrite PROTO (( NewSummaryListPtr , AsnIoPtr, AsnTypePtr));
  488.  
  489.  
  490.  
  491.  
  492. #endif
  493.